#ifndef MAIN_SETTINGS
#define MAIN_SETTINGS

#include <QSettings>
#include <QFileInfo>
#include "settings_define.h"

class QMainSettings: public QSettings
{
public:
  ~QMainSettings();

  static QMainSettings* instance();
  static void destroy();
  void reset();

private:
  QMainSettings();
  
  static QMainSettings* m_instance;
};


#define __getNoPart()			QMainSettings::instance()->value(SETTINGS_DESIGNATORS_EXCLUSION_NO_PART).toString().split(SETTINGS_SEPARATOR)
#define __getCommonPart()		QMainSettings::instance()->value(SETTINGS_DESIGNATORS_EXCLUSION_COMMON_PART).toString().split(SETTINGS_SEPARATOR)
#define __getBaseName()			QMainSettings::instance()->value(SETTINGS_BDD_NAME).toString()
#define __getSettings(__LABEL__)	QMainSettings::instance()->value(__LABEL__).toString()
#define __setSettings(__LABEL__,__VALUE__)	QMainSettings::instance()->setValue(__LABEL__,__VALUE__)
#endif
